package com.demo.task.controller;


import com.demo.task.entity.TmBrandSales;
import com.demo.task.service.ITmBrandSalesService;
import com.demo.task.service.impl.TmBrandSalesServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * SCMS-品牌表 前端控制器
 * </p>
 *
 * @author 翌擎科技
 * @since 2021-09-16
 */
@RestController
@RequestMapping("/task/tm-brand-sales")
public class TmBrandSalesController {

    @Autowired
    private ITmBrandSalesService brandSalesService;

    @RequestMapping(method = RequestMethod.GET,value = "/query_all")
    public List<TmBrandSales> queryAll(){
        return brandSalesService.queryAll();
    }

    @RequestMapping(method = RequestMethod.GET,value = "/delete")
    public int deleteByCode(@RequestParam("brandCode") String brandCode){
        return brandSalesService.deleteById(brandCode);
    }
}
